package cn.example.web;

import org.artifact.builder.DBModulebuilder;
import org.artifact.builder.design.DesignConfig;
import org.artifact.builder.enums.BuilderDatabaseEnum;
import org.artifact.builder.enums.BuilderMethodEnum;

public class DBGenerate {
	public static void main(String[] args) throws Exception {
		String designSourcePath = "design";

		DesignConfig designConfig = new DesignConfig();
		designConfig.setDatabaseName("example_web");
		designConfig.setTablePrefix("t_");
		designConfig.setType(BuilderDatabaseEnum.mysql);
		designConfig.setMethods(new BuilderMethodEnum[0]);

		DBModulebuilder.newBuilder()
		.setDesignConfig(designConfig)
		.setPackageName("cn.example.web.db")
		.setSourcePath("example-web/src/main/java/cn/example/web/db")
		.setDesignSourcePath(designSourcePath)
		.build();
	}
}
